class Cat:
    name =""
    tili = 0
    def __init__(self,n,t):
        self.name = n
        self.tili = t
    def play(self):
        self.tili -= 10
        print("%s在玩耍"%self.name)
        self.status()
    def rest(self):
        self.tili = 100
        print("%s在睡觉" % self.name)
        self.status()
    def status(self):
        print("%s现在的体力是%s"%(self.name,self.tili))
cat =Cat("小白",50)
cat.play()
cat1 = Cat("小黑",100)
cat1.rest()
